package bikeAD;

import redis.clients.jedis.Jedis;

public class setRedis {

    //设置验证码并获取
    public void setVcode(String phoneNum) {
    //连接redis服务器
        Jedis jedis = new Jedis("10.6.26.188", 6000);
        //权限认证
        jedis.auth("sldlsflskmg1MAku9O");
        //设置验证码
        jedis.setex("b2b/rompers/user/sms/"+phoneNum+"", 5000, "1234");
        //获取验证码
        String Vcode = jedis.get("b2b/rompers/user/sms/13066889177");
        System.out.println("Vcode = " + Vcode);
    }

}
